package com.base.bean;

import lombok.Data;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.CardinalityAggregationBuilder;
import org.elasticsearch.search.sort.SortOrder;

/**
 * es查询请求对象
 */
@Data
public class EsQueryReqPO {

    /**
     * 索引名
     */
    String[] index;

    /**
     * 查询条件
     */
    QueryBuilder query;

    /**
     * 排序字段
     */
    String sortField;

    /**
     * 排序方式 SortOrder.ASC、SortOrder.DESC
     */
    SortOrder sort;

    /**
     * 页数
     */
    private Integer pageNum;

    /**
     * 页大小
     */
    private Integer pageSize;

}